<!--奖品设置-->
<div class="card">
    <div class="h-title">基础规则设置</div>
    <div class="h-content" style="padding-bottom: 1px;">
        <div class="checkbox-group" style="margin-top: 20px;">
            <label>现场抽奖</label>
            <div class="checkboxes">
                <div class="checkbox-wrap">
                    <input name="isSpot" type="radio" ng-value="false" ng-model="postData.rules.is_spot">
                    <span>否</span>
                </div>
                <div class="checkbox-wrap">
                    <input name="isSpot" type="radio" ng-value="true" ng-model="postData.rules.is_spot">
                    <span>是</span>
                </div>
            </div>
        </div>
        <div ng-if="postData.rules.is_spot" ng-cloak="">
            <div class="input-group">
                <label>参与地址</label>
                <input class="addressInput" na-value="postData.rules.address" ng-model="postData.rules.address" id="suggestId" type="text" placeholder="输入抽奖地址"/><!--ng-keydown="enterKey($event)"*/-->
                <!--<span class="fa fa-map-marker location" ng-click="setAddress()"></span>-->
            </div>
            <div class="BMap-wrap">
                <div class="ngBGeocoder" autocomplateid="suggestId" mapaddress="postData.rules.address" longitude="postData.rules.longitude" latitude="postData.rules.latitude" index="0"></div>
            </div>
            <div class="input-group">
                <label>经度</label>
                <input ng-model="postData.rules.longitude" readonly="readonly" type="text" placeholder="经度" style="cursor: not-allowed"/>
            </div>
            <div class="input-group">
                <label>纬度</label>
                <input ng-model="postData.rules.latitude" readonly="readonly" type="text" placeholder="纬度" style="cursor: not-allowed"/>
            </div>
            <div class="input-group">
                <label>范围</label>
                <input ng-model="postData.rules.range" type="text" placeholder="请输入范围"/>
                <span style="margin-left:10px">米</span>
            </div>
        </div>
    </div>
</div>
<div class="card">
    <div class="h-title">奖项设置</div>
    <div class="table-wrap">
        <div class="table-grid">
            <table class="spec">
                <thead>
                <tr>
                    <th style="width:10%">图片</th>
                    <th style="width:24%">名称</th>
                    <th style="width:14%">中奖限制</th>
                    <th style="width:14%">库存限制</th>
                    <th style="width:14%" ng-if="model_rule!='roulette'">红包限额</th>
                    <th style="width:14%" ng-if="model_rule=='roulette'">展示名称</th>
                    <th style="width:16%">中奖概率</th>
                    <th style="width:10%">操作</th>
                </tr>
                </thead>
                <tbody class="tbody">
                <tr ng-repeat="prize in prizes track by $index">
                    <td style="width:10%"><img ng-cloak="" ng-src="{{prize.prize.background_image}}"/></td>
                    <td style="width:24%" ng-bind="prize.prize.name"></td>
                    <td style="width:14%"><input type="number" ng-model="prize.winning_limit" tooltip title="限制每一个用户最多能抽中该奖品多少次，填0表示不限制"/></td>
                    <td style="width:14%"><input type="number" ng-model="prize.stock_limit" placeholder="0-{{prize.prize.availables}}" tooltip min="0" max="prize.prize.availables"/></td>
                    <!--<td style="width:14%"><input type="number" placeholder="1-200" tooltip title="红包奖品为此次活动的总金额，微信红包每次只能发1-200元" ng-model="prize.max_amount"/></td>-->
                    <td style="width:14%" ng-if="model_rule!='roulette'">-</td>
                    <td style="width:14%" ng-if="model_rule=='roulette'"><input type="text" tooltip title="展示名称不能为空，且不超过4个字" placeholder="别名" ng-model="prize.alias_name"/></td>
                    <td style="width:16%"><input style="width:70%" type="number" ng-model="prize.winning_probability" placeholder="0-100" tooltip min="0" max="100" title="中奖概率=奖品数/预估的参与人数*100%,最小可设置为0.最大可设置100% ,注:所有奖品概率总和不能大于100%"/>&nbsp;&nbsp;%</td>
                    <td style="width:10%" ng-click="deletePrize($event,$index,prize.id,prize.prize_id)"><a>删除</a></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="table-footer pt10">
            <button class="small-green-button xs" ng-click="openListModal($event)"><i class="fa fa-plus"></i>添加奖项</button>
        </div>
    </div>
</div>